package com.wulian.common.euums;

/**
 * 
* @ClassName: RedisPartition
* @Description: (通过枚举类选择redis使用的数据库)
* @author mzh
* @date 2020年5月19日
*
 */
public enum RedisPartition {
	//以下分别代表redis 0-15库
    INFO(0),
    One(1),
    Two(2),
    THREE(3),
    FOUR(4),
    FIVE(5),
    SIX(6),
    SEVEN(7),
    EIGHT(8),
    NINE(9),
    TEN(10),
    ELEVEN(11),
    TWELVE(12),
    THIRTEEN(13),
    FOURTEEN(14),
    FIFTEEN(15);

    private int ordinal;
    //构造方法
    RedisPartition(int ordinal) {
        this.ordinal = ordinal;
    }

    public void setOrdinal(int dbNum) {
        this.ordinal = dbNum;
    }

    public int getOrdinal() {
        return ordinal;
    }

    @Override
    public String toString() {
        return ""+ordinal;
    }
}
